package com.yrk.controller;

import com.yrk.entity.Role;
import com.yrk.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RoleController {
    @Autowired
    private RoleService roleService;

    @RequestMapping("/getRole")
    public List<Role> getRole() {
        return roleService.getRoles();
    }
}
